import request from "@/utils/request";
export function getDomainList(query) {
    return request({
        url: "/tk/domain/page",
        method: "get",
        params: query,
    });
}

export function getUserSelectDomain(query) {
    return request({
        url: "/tk/user-domain-rel/page",
        method: "get",
        params: query,
    });
}


export function addDomain(query) {
    return request({
        url: "/tk/domain/create",
        method: "post",
        data: query,
    });
}

export function editDomain(query) {
    return request({
        url: "/tk/domain/update",
        method: "put",
        data: query,
    });
}

export function deleteDomain(query) {
    return request({
        url: "/tk/domain/delete",
        method: "delete",
        params: query,
    });
}

export function batchDeleteDomain(query) {
    return request({
        url: "/tk/domain/batch-delete",
        method: "delete",
        params: query,
    });
}

export function exportDomain(query) {
    return request({
        url: "/tk/domain/export-excel",
        method: "get",
        params: query,
        responseType: "blob",
    });
}

export function updataDomainStatus(query) {
    return request({
        url: "/tk/domain/batch-update",
        method: "put",
        data: query,
    });
}

export function publishDomain(query) {
    return request({
        url: "/tk/user-domain-rel/create",
        method: "post",
        data: query,
    });
}
